| Conditions | 2 | 
| Paths | 2 | 
| Total Lines | 17 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | import fs from 'fs-extra'  | 
            ||
| 12 | var route = function(req, res){ | 
            ||
| 13 | var resHtml = ''  | 
            ||
| 14 | |||
| 15 | var page = path.join(__dirname + '/../views/list-structure.html')  | 
            ||
| 16 |   if (coreUtils.file.exist(page)) { | 
            ||
| 17 | resHtml = fs.readFileSync(page, 'utf8')  | 
            ||
| 18 | }  | 
            ||
| 19 | |||
| 20 | var structure = Manager.instance.getStructureAndTemplates().structure  | 
            ||
| 21 | structure = JSON.stringify(structure).replace(new RegExp(config.root, 'g'), '')  | 
            ||
| 22 |   var template = Handlebars.compile(resHtml, {noEscape: true}) | 
            ||
| 23 |   var tmp = template({ | 
            ||
| 24 | config: JSON.stringify(config),  | 
            ||
| 25 | structure: structure  | 
            ||
| 26 | })  | 
            ||
| 27 | return res.send(tmp)  | 
            ||
| 28 | }  | 
            ||
| 29 | |||
| 31 |